<?php

namespace LowCode\Traits;

use LowCode\Node;

/**
 * 设置 slot action 内容
 */
trait HasSlotDefault
{
    public function addSlot(Node $node, string $slotName, array $params = []): static
    {
        return $this->children($node->slot($slotName, $params));
    }

    public function slotDefault(Node $node, array $params = []): static
    {
        return $this->addSlot( $node, "default", $params);
    }
}
